﻿//*** Guidance generated code ***//
using System;
using System.Collections.Generic;
using System.Diagnostics.Contracts;
using System.Linq;

using ProjectBase.Core;
using ProjectBase.Core.Dao;
using ProjectBase.Data.Xml;

namespace $safeprojectname$.Sessions
{
    /// <summary>
    ///     Container for the IXmlRequestSession used in a batch layers
    /// </summary>
    public static class XmlSimpleSession
    {
        #region members
        static IXmlRequestSession _simpleSession;
        #endregion members

        #region init & dispose
        /// <summary>
        ///     Instantiates the new singelton instance of the session holder.
        /// </summary>
        public static void Initialize()
        {
            if (_simpleSession.IsNull())
            {
                _simpleSession = new SimpleSessionStorage();

                XmlSession.Initialize(_simpleSession);
            }
            else
            {
                XmlSession.Clear();
            }
        }
        #endregion init & dispose
    }
}